Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inout variant of groupedReduce #221

Merged
merged 1 commit into from
Oct 2, 2020
Merged

Add inout variant of groupedReduce #221

merged 1 commit into from
Oct 2, 2020

Conversation

p4checo
Copy link
Member

@p4checo p4checo commented Oct 2, 2020

Checklist

Motivation and Context

Similar to the stdlib's reduce, the groupedReduce can provide an
inout variant for improved efficiency when the group type has
copy-on-write semantics (like Array or Dictionary).

Description

  • Create new groupedReduce(into:combine:groupBy) variant with an
    inout combine closure.

Similar to the stdlib's `reduce`, the `groupedReduce` can provide an
`inout` variant for improved efficiency when the group type has
copy-on-write semantics (like `Array` or `Dictionary`).

## Changes

- Create new `groupedReduce(into:combine:groupBy)` variant with an
`inout` combine closure.
@p4checo p4checo requested a review from a team October 2, 2020 10:29
@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

Merging #221 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #221      +/-   ##
==========================================
+ Coverage   94.82%   94.84%   +0.01%     
==========================================
  Files          97       97              
  Lines        3190     3198       +8     
==========================================
+ Hits         3025     3033       +8     
  Misses        165      165              
Impacted Files Coverage Δ
Sources/Extensions/Foundation/Sequence.swift 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0fe7734...3894aa4. Read the comment docs.

@p4checo p4checo merged commit f8e6f53 into master Oct 2, 2020
@p4checo p4checo deleted the inout-grouped-reduce branch October 2, 2020 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants